package com.example.userblog.controller;

import com.example.userblog.common.Result;
import com.example.userblog.entity.Type;
import com.example.userblog.entity.User;
import com.example.userblog.service.TypeService;
import com.example.userblog.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("type")
public class TypeController {
    @Resource
    TypeService typeService;
    @GetMapping("/list")
    public Result getData(){

        List<Type> types=typeService.getAll();

        return Result.success(typeService.getAll());


    }
}
